Skip to content

Don't create resources in terminating Namespaces#3791

Merged
caseydavenport merged 4 commits intotigera:masterfrom
caseydavenport:casey-fix-uninstall
Feb 26, 2025
Merged

Don't create resources in terminating Namespaces#3791
caseydavenport merged 4 commits intotigera:masterfrom
caseydavenport:casey-fix-uninstall

Conversation

@caseydavenport
Copy link
Copy Markdown
Member

@caseydavenport caseydavenport commented Feb 26, 2025

Description

In some cases, the operator can attempt to create new resources within a
terminating Namespace with fianlizers set on objects within. If this happens, an error will occur, which
prevents reaching the NodeComponent who is responsible for removing
those finalizers. As a result, we deadlock.

We should never be installing resources into Namespaces that are being torn down, since it will never succeed!

For PR author

  • Tests for change.
  • If changing pkg/apis/, run make gen-files
  • If changing versions, run make gen-versions

For PR reviewers

A note for code reviewers - all pull requests must have the following:

  • Milestone set according to targeted release.
  • Appropriate labels:
    • kind/bug if this is a bugfix.
    • kind/enhancement if this is a a new feature.
    • enterprise if this PR applies to Calico Enterprise only.

@caseydavenport caseydavenport changed the title Don't create cert bundle, Typha when uninstalling Don't create resources in terminating Namespaces Feb 26, 2025
Copy link
Copy Markdown
Member

@tmjd tmjd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For all the changes in the in the component_test I don't see any test for this new behavior. Could you add one?

@caseydavenport caseydavenport merged commit 1d1ec41 into tigera:master Feb 26, 2025
5 checks passed
caseydavenport added a commit to caseydavenport/operator that referenced this pull request Feb 26, 2025
* Don't install resources into terminating Namespaces

* Fix tests

* Add UT

* make gen-versions
@caseydavenport caseydavenport deleted the casey-fix-uninstall branch February 9, 2026 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants